<template>
  <div class="search_cont_one">
    <!--    排行榜内容-->
    <ul class="cont_row">
      <!--      <li v-for="(item,index) in navlist">-->
      <li v-for="(item,index) in searchlist">
        <span>{{item.num}}</span>
        <p>{{item.title}}</p>
        <svg class="icon" aria-hidden="true">
          <use :xlink:href="item.ico"></use>
        </svg>
      </li>
    </ul>
    <!--    遮盖层-->
    <div class="above">
      <p>打开喜马拉雅App</p>
      <p>可查看完整热搜榜</p>
    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        searchlist:[]
      }
    },
    mounted() {
      var _this=this;
      this.$http.get('./data/search.json')
        .then((response)=>{
          //成功之后的
          // console.log(response);
          this.searchlist=response.data.searchlist;
        })
        .catch(function (err) {
          //失败的
          console.log(err);
        })
        .then(function () {
          //总会执行的
          //always executed
        })
    }
  }
</script>

<style scoped>
  /*  排行榜内容*/
  .cont_row{
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
  }
  .cont_row li{
    display: flex;
    justify-content: space-around;
    font-size: 16px;
    /*border:1px solid red;*/
    padding: 10px 20px;
  }
  .cont_row li>span{
    display: block;
    flex-grow: 1;
    width: 5%;
    /*border: 1px solid blue;*/
    color: #dabda6;
    font-weight: 500;
    text-align: center;
  }
  .cont_row li:nth-of-type(1)>span,.cont_row li:nth-of-type(2)>span,.cont_row li:nth-of-type(3)>span{
    font-size: 20px;
  }
  .cont_row li:nth-of-type(1)>span{
    color: #ff0b0b;
  }
  .cont_row li:nth-of-type(2)>span{
    color:#f86442 ;
  }
  .cont_row li:nth-of-type(3)>span{
    color: #f8a642;
  }
  .cont_row li>p{
    flex-grow: 2;
    width: 80%;
    padding: 0 10px;
    /*border: 1px solid purple;*/
  }
  .cont_row li>svg{
    /*border: 1px solid gold;*/
    font-size: 10px;
  }
  .above{
    position: absolute;
    bottom: 0;
    height: 175px;
    width: 100%;
    background: rgba(0,0,0,.7);
    padding-top: 60px;
    box-sizing: border-box;
    text-align: center;
    color: #FFFFFF;
    font-weight: 700;
    line-height: 30px;
  }
</style>
